import { Component, OnInit } from '@angular/core';
import {Sitedata} from "../data-collect/sitedata"
import {sitedatalist} from '../data-collect/sites';
import {SitedataserviceService} from "../sitedataservice.service"

@Component({
  selector: 'app-data-collect',
  templateUrl: './data-collect.component.html',
  styleUrls: ['./data-collect.component.css']
})
export class DataCollectComponent implements OnInit {

  constructor(private sitedataserviceservice:SitedataserviceService) { }

  ngOnInit() {
  }
  sitedata=new Sitedata(null,null,null,null,null);
  sitedatalist=sitedatalist
  submit(){    
    console.log(this.sitedata.name,this.sitedata.x_loc);  
    this.sitedataserviceservice.addSiteData(this.sitedata);
    console.log(this.sitedataserviceservice.getSiteDataList());

  }

}
